package cn.qinhao.pethome.basic.base.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseQuery {
    //当前页为第几页
    private Long currentPage;
    // 每页显示几条
    private Long pageSize;
    //前端传得参数，关键字，传到分页参数中
    private String keyword;

    //计算当前页的起点，从那一条开始显示
    public Long getStart(){
        return (this.currentPage-1)*this.pageSize;
    }
}
